const mongoose = require('mongoose');

mongoose.connect('mongodb://api:6Gmk3EpaKEDiPiyD@39.102.211.110:27017/api?authSource=api')

const conn = mongoose.connection;

conn.on('open', () => {
    console.log('连接成功');
})

conn.on('error', () => {
    console.log('连接失败')
})

module.exports = mongoose;